@import 'style/hideAds.scss';
@import './index.mobile.less';
@import url(https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css);

:root[mode='light'] {
    --blog-bg-color: #fff;
    --text-color: #596172;
    --border-color: #eef2f8;
    --catalog-bg-color: #fff;
    --panel-bg-color: #f8f8f8;
    --code-bg-color: #f1f1f1;
}

:root[mode='dark'] {
    --blog-bg-color: #202020;
    --text-color: #d8d8d8;
    --border-color: #2f2f2f;
    --catalog-bg-color: #252525;
    --panel-bg-color: #252525;
    --code-bg-color: #3a3a3a;
}

:root[theme='a'] {
    --theme-color: #2d8cf0;
}
:root[theme='b'] {
    --theme-color: #fa7298;
}
:root[theme='c'] {
    --theme-color: #42b983;
}
:root[theme='d'] {
    --theme-color: #607d8b;
}
:root[theme='e'] {
    --theme-color: #5e72e4;
}
:root[theme='f'] {
    --theme-color: #ff9700;
}
:root[theme='g'] {
    --theme-color: #ff5722;
}
:root[theme='h'] {
    --theme-color: #009688;
}
:root[theme='i'] {
    --theme-color: #673bb7;
}
:root[theme='j'] {
    --theme-color: #906f61;
}

* {
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    background: var(--blog-bg-color);
    height: 100%;
    color: var(--text-color);
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    font-weight: 300;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}
td {
    padding: 5px;
}
fieldset,
img {
    border: 0;
}
ul {
    word-break: break-all;
}
li {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: 100%;
    font-weight: normal;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;

    &:hover {
        color: var(--theme-color);
    }
}

::selection {
    background: var(--theme-color);
    color: #fff;
}
.navbar,
.blogStats,
.dayTitle,
#lnkBlogLogo,
#ad_t2,
#ad_c1,
#ad_c2,
.c_ad_block,
#under_post_news,
#under_post_kb,
#author_profile,
#green_channel,
#comment_nav,
.under-comment-nav,
#comment_pager_top {
    display: none;
}

.clear {
    clear: both;
}

#home {
    width: 100%;
    height: 100%;
    transition: all 378ms;
}

#header {
    width: 960px;
    position: relative;
    top: 0;
    right: 0;
    left: 0;
    margin: 0 auto;
    border-top: 0px;
    border-bottom: 1px var(--border-color) solid;
    padding-bottom: 0px;
    display: block;
    height: 60px;
    z-index: 999;
}

#blogTitle {
    h1 {
        font-size: 25px;
        font-weight: 600;
        font-family: 'Georgia';
        float: left;
        margin-top: 15px;
    }

    h2 {
        display: none;
    }
}

#navigator {
    height: inherit;
    position: absolute;
    right: 0px;
    top: 0px;
}

#navList {
    height: inherit;
    float: left;

    & > li {
        position: relative;
        float: left;

        &:hover i {
            width: 100%;
            left: 0;
        }

        & > a {
            float: left;
            font-size: 17px;
            border-right: 0px;
            font-weight: 300;
            text-align: center;
            width: auto;
            padding: 19px 16px;

            &::after {
                content: '';
                position: absolute;
                width: 100%;
                height: 4px;
                bottom: 0;
                left: 0;
                background-color: var(--theme-color);
                visibility: hidden;
                transform: scaleX(0);
                transition: 0.4s ease-in-out;
            }

            &:hover {
                &::after {
                    visibility: visible;
                    transform: scaleX(1);
                }
            }
        }
    }

    .open {
        transform: rotate(180deg) scaleX(-1);
        transition-duration: 0.3s;
    }

    .esa-sub-navs {
        position: absolute;
        width: 130px;
        top: 60px;
        left: calc(50% - 65px);
        display: none;

        .caret {
            border-top: 0px solid transparent;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-bottom: 8px solid var(--blog-bg-color);
            width: 0px;
            position: relative;
            left: calc(50% - 8px);
        }

        ul {
            background-color: var(--blog-bg-color);
            border-radius: 4px;
            box-shadow: 0 1px 15px rgba(27, 31, 35, 0.15);
            padding: 10px;
            text-align: center;

            li {
                float: none;

                a {
                    font-size: 15px;
                    border-right: 0;
                    color: var(--text-color);
                    display: block;
                    width: 100%;
                    padding: 10px 0px;
                    height: inherit;
                    border-bottom: 1px solid transparent;

                    &:hover {
                        color: var(--theme-color);
                    }
                }
            }
        }
    }
}

#main {
    width: 960px;
    margin: 0 auto;
    min-height: calc(100% - 75px);
    padding: 15px 0px;
    transition: all 0.3s ease;
}

#mainContent {
    float: right;
    margin-left: -25em;
    width: 100%;

    .forFlow {
        margin: 0px auto;
        margin-left: 0px;
        max-width: 960px;
    }
}

#sideBar {
    width: 230px;
    border-right: 1px solid var(--border-color);
    font-weight: 300;
    display: none;
    min-height: 750px;
    padding: 0 15px 0 0;

    #profile_block {
        margin: 0;
        font-size: 0;
        display: flex;
        flex-wrap: wrap;
        text-align: left;
        line-height: 1.6;

        a {
            box-sizing: border-box;

            &:nth-child(1) {
                font-size: 18px;
                font-weight: 700;
                width: 100%;
                display: block;
                text-align: center;
                margin-bottom: 14px;
            }

            &:nth-child(3):after {
                content: '\56ed\9f84';
            }
            &:nth-child(5):after {
                content: '\7c89\4e1d';
            }
            &:nth-child(7):after {
                content: '\5173\6ce8';
            }

            &:nth-child(3),
            &:nth-child(5),
            &:nth-child(7) {
                font-size: 14px;
                width: 33.3333333%;
                display: block;
                padding: 0 4px;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
                text-align: center;

                &:after {
                    color: #97979f;
                    font-size: 14px;
                    display: block;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    width: 100%;
                    font-weight: 400;
                }
            }
        }

        #p_b_follow {
            margin: 15px 0 10px 0;
            text-align: center;
            a {
                border: 1px solid var(--border-color);
                font-size: 13px;
                padding: 7px 0px;
                border-radius: 4px;
                width: 230px;
                font-weight: 300;

                &:hover {
                    border-color: var(--theme-color);
                }
            }
        }
    }
}

.newsItem {
    margin-bottom: 10px;

    .catListTitle {
        display: none;
    }
}

#blog-calendar {
    border-top: 1px solid var(--border-color);

    .CalDayHeader {
        font-weight: 300;
    }
    .CalTodayDay {
        color: var(--theme-color);
        font-weight: 600;
    }
}

#sideBarMain ul {
    line-height: 1.6;
}

.catListTitle {
    text-align: left;
    margin: 20px 0;
    font-size: 20px;
    font-weight: 300;
    border-left: 4px solid var(--theme-color);
    border-radius: 4px;
    padding-left: 7px;
}

#sidebar_search {
    #widget_my_zzk {
        .input_my_zzk {
            color: #314659;
            border: solid 1px var(--border-color);
            background-color: transparent;
            width: 150px;
            height: 32px;
            padding: 0 7px;
            font-size: 16px;
            border-radius: 4px;

            &:focus {
                outline: none;
            }
        }

        .btn_my_zzk {
            height: 34px;
            font-size: 14px;
            font-weight: 300;
            background-color: transparent;
            color: var(--text-color);
            cursor: pointer;
            width: 59px;
            outline: 0;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            transition: border 0.3s;

            &:hover {
                color: var(--theme-color);
                border: 1px solid var(--theme-color);
            }
        }
    }
    #widget_my_google {
        display: none;
    }
}

#sidebar_toptags li {
    font-size: 14px;
    height: 16px;
    line-height: 16px;
    padding: 5px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
    border: 1px solid var(--border-color);
    margin: 0 6px 6px 0;
    display: inline-grid;
    transition: all 0.3s ease;
    border-radius: 4px;

    a {
        transition: inherit;
        .tag-count {
            display: none;
        }
    }

    &:link,
    &:visited,
    &:active {
        border-color: var(--border-color);
    }

    &:hover {
        border-color: var(--theme-color);
    }
}
#sidebar_shortcut li,
#sidebar_scorerank li,
#sidebar_categories li {
    font-size: 15px;
    height: 40px;
    padding-left: 3px;
    line-height: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    list-style: none;
}

#sidebar_recentposts li,
#sidebar_topviewedposts li,
#sidebar_topcommentedposts li,
#sidebar_topdiggedposts li {
    font-size: 15px;
    padding: 7px 0px;
    transition: all 0.3s;
    text-align: justify;
    border-bottom: 1px solid var(--border-color);

    &:nth-child(1) {
        border-top: 1px solid var(--border-color);
    }
}

#sidebar_recentcomments {
    li {
        text-align: justify;
    }

    .recent_comment_title {
        &:nth-child(n + 2) {
            padding-top: 10px;
        }

        &:nth-child(1) {
            border-top: 1px solid var(--border-color);
            padding-top: 10px;
        }
    }

    .recent_comment_body {
        border-radius: 4px;
        padding: 5px 10px;
        margin: 5px 0px;
        background-color: var(--panel-bg-color);
    }

    .recent_comment_author {
        margin-right: 0px;
        text-align: right;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
    }
}

.entrylistTitle,
.PostListTitle,
.thumbTitle,
.myposts_title,
#taglist_title {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 10px;
    text-align: left;
}

.entrylistDescription {
    margin: 15px auto;
    border-left: 4px solid var(--border-color);
    text-align: justify;
    padding-left: 7px;
}

#myposts {
    margin-left: 0px;

    .PostList {
        &:first-of-type {
            border-top: 1px solid var(--border-color);
        }
        border-bottom: 1px solid var(--border-color);
        padding: 0px;
        margin: 0px;
    }

    .postTitl2 {
        font-size: 17px;
        margin: 10px 0px;
        text-align: justify;
    }

    .postDesc2 {
        text-align: right;
        margin-bottom: 10px;
        font-size: 14px;

        & > a {
            display: none;
        }

        &::before {
            font-family: FontAwesome;
            content: '\f017';
            opacity: 0.7;
        }
    }
}

.post-view-count {
    &::before {
        font-family: FontAwesome;
        content: '\f06e';
        padding-left: 10px;
        padding-right: 5px;
        opacity: 0.7;
    }
}

.post-comment-count {
    &::before {
        font-family: FontAwesome;
        content: '\f27b';
        padding-left: 10px;
        padding-right: 5px;
        opacity: 0.7;
    }
}

.post-digg-count {
    &::before {
        font-family: FontAwesome;
        content: '\f087';
        padding-left: 10px;
        padding-right: 5px;
        opacity: 0.7;
    }
}

.day > .postSeparator {
    border-bottom: 1px solid var(--border-color);
    text-align: justify;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.day,
.entrylistItem {
    border-bottom: 1px solid var(--border-color);
    text-align: justify;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.day .postTitle,
.entrylist .entrylistPosttitle {
    font-size: 19px;

    & > a {
        position: relative;

        &:after {
            content: '';
            display: block;
            width: 0;
            height: 1px;
            position: absolute;
            left: 0;
            bottom: -2px;
            background: var(--theme-color);
            transition: all 0.3s ease-in-out;
        }

        &:hover {
            &::after {
                width: 100%;
            }
        }
    }
}

.day .postCon,
.entrylist .entrylistPostSummary {
    font-size: 16px;
    padding: 10px 0;

    img {
        width: 200px;
        height: 150px;
        border-radius: 4px;
        margin-left: 10px;
    }

    a {
        border-bottom: 1px dotted var(--text-color);
        padding: 2px 5px;
        font-size: 14px;
        margin-top: 10px;
        display: table;

        &:after {
            content: ' \00bb';
        }

        &:hover {
            border-bottom: 1px dotted var(--theme-color);
        }
    }
}

.day .postDesc,
.entrylist .entrylistItemPostDesc {
    text-align: right;

    & > a {
        display: none;
    }
}

.toc-container-header {
    font-size: 20px;
    font-weight: bold;
}

#topics {
    .postTitle {
        font-size: 21px;
        font-weight: 300;
    }

    .postBody {
        font-size: 16px;
        line-height: 1.75;

        a {
            color: var(--theme-color);
            position: relative;

            &:after {
                content: '';
                display: block;
                width: 0;
                height: 1px;
                position: absolute;
                left: 0;
                bottom: -2px;
                background: var(--theme-color);
                transition: all 0.3s ease-in-out;
            }

            &:hover {
                &::after {
                    width: 100%;
                }
            }
        }

        h1 {
            font-size: 21px;
        }

        h2 {
            font-size: 20px;
        }

        h3 {
            font-size: 19px;
        }

        h4 {
            font-size: 18px;
        }

        h5 {
            font-size: 17px;
        }

        h6 {
            font-size: 16px;
        }

        p {
            margin: 13px auto;
        }

        hr {
            border-top: none;
            border-bottom: 1px solid var(--border-color);
        }

        blockquote {
            border: none;
            margin: 15px 0px;
            color: inherit;
            border-radius: 4px;
            padding: 1px 15px;
            border-left: 4px solid var(--theme-color);
            background-color: var(--panel-bg-color);
        }

        em {
            padding-right: 3px;
        }

        strong {
            margin: 0 3px;
            font-weight: 500;
        }

        img {
            display: block;
            margin: 15px 0px 30px 0px;
            border-radius: 3px;
            box-shadow: 0 1px 15px rgba(27, 31, 35, 0.15),
                0 0 1px rgba(106, 115, 125, 0.35);
        }

        .cnblogs-markdown pre {
            white-space: pre;
            position: relative;
        }

        ul,
        ol {
            li {
                margin: 3px 0px;
            }
        }

        table {
            font-size: 15px;
            width: 100%;
            margin: 15px 0px;
            display: block;
            overflow-x: auto;
            border: none;

            &::-webkit-scrollbar {
                height: 4px !important;
            }

            th {
                background: var(--panel-bg-color);
                border: 1px solid var(--border-color);
                white-space: nowrap;
                font-weight: 400;
                padding: 6px 15px;
                min-width: 100px;
            }

            td {
                border: 1px solid var(--border-color);
                padding: 6px 15px;
                min-width: 100px;
            }
        }

        h1 code,
        h2 code,
        h3 code,
        h4 code,
        h5 code,
        h6 code,
        p > code,
        li > code,
        table code {
            line-height: 1.2;
            font-family: consolas !important;
            vertical-align: middle;
            margin: 0 3px;
            background-color: var(--code-bg-color) !important;
            font-size: 14px !important;
            padding: 0.2em 0.3em !important;
            border-radius: 3px !important;
            border: none !important;
        }

        #BlogPostCategory,
        #EntryTag {
            font-size: 14px;
            a {
                font-size: 13px;
                border-radius: 4px;
                padding: 4px 6px;
                background-color: var(--panel-bg-color);
                margin-right: 5px;
                transform: none;
                color: var(--text-color);

                &:hover {
                    color: #fff;
                    background-color: var(--theme-color);
                }

                &::after {
                    content: none;
                }
            }
        }

        #BlogPostCategory:before {
            content: '\f07c';
            font-family: FontAwesome;
            opacity: 0.7;
        }

        #EntryTag:before {
            content: '\f02c';
            font-family: FontAwesome;
            opacity: 0.7;
        }

        #post_next_prev {
            font-size: 14px;
        }
    }

    .postDesc {
        border-top: 1px solid var(--border-color);
        padding-top: 5px;
        margin-top: 5px;
        text-align: right;
    }
}

.cnblogs_code {
    background-color: #333232;
    padding-left: 1em;
    padding-right: 1em;
    border: none;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace !important;

    div {
        background-color: transparent;
        color: #656c73;
    }

    img {
        margin: 0 !important;
    }

    pre {
        color: #abb2bf;
        font-family: inherit !important;
        font-size: 15px !important;

        span {
            font-family: inherit !important;
            color: inherit !important;
        }
    }

    textarea {
        font-family: inherit !important;
        padding: 5px;
        border: 1px solid #3e4c42;
        color: #c5d4ef;
        background-color: #282c34;

        &:focus {
            outline: 0;
        }
    }

    .code_img_closed,
    .code_img_opened {
        display: none !important;
    }

    .cnblogs_code_toolbar {
        width: 20px;

        span {
            padding-right: 0;
        }

        a:link img {
            background-color: transparent !important;
        }
    }

    .cnblogs_code_collapse {
        color: #656c73;
        border: 1px solid #656c73 + #333;
        border-radius: 2px;
        background-color: transparent;
        display: inline-block;
        cursor: pointer;
        padding: 5px 5px 2px 5px;
    }
}

#footer {
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    text-align: center;
    padding: 15px 0;
}

.louzhu {
    color: var(--theme-color);
    font-weight: 500;
}

.feedbackListSubtitle {
    .sendMsg2This {
        background: transparent;
        padding-left: 0px;
        font-size: 15px;

        &::before {
            content: '✉️';
        }
    }
}

.feedbackManage {
    float: right;
}

.feedbackItem .feedbackCon {
    margin-bottom: 10px;
    padding: 10px 0px;
    border-bottom: 1px solid var(--border-color);

    .comment_vote {
        margin-top: 12px;
    }
}

.blog_comment_body {
    width: auto;
    border-radius: 4px;
    padding: 12px;
    margin-left: 50px;
    background-color: var(--panel-bg-color);
    min-height: 19px;

    img {
        border-radius: 3px;
    }
}

#taglist_main {
    margin-top: 0px;

    table {
        width: 100%;

        tr td {
            padding: 5px 20px 5px 0px;

            &:last-child {
                padding-right: 0px;
            }

            .small {
                display: none;
            }
        }

        tr td a {
            display: block;
            padding: 5px;
            font-weight: 300;
            line-height: 20px;
            text-align: center;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            color: var(--text-color);

            &:hover {
                border: 1px solid var(--theme-color);
            }
        }
    }
}

#div_digg {
    margin: 0;
    width: auto;

    .diggit,
    .buryit {
        background: none;
        height: auto;
        width: auto;
        min-width: 60px;
        margin: 0;
        font-size: 17px;
        border-radius: 4px;
        padding: 3px 10px;
        background-color: var(--panel-bg-color);
        transition: all 0.3s;

        span {
            font-size: inherit;
            color: inherit;
        }

        &:hover {
            color: #fff;
            background-color: var(--theme-color);
        }
    }

    .diggit {
        &::before {
            content: '\f087';
            font-family: FontAwesome;
            opacity: 0.7;
        }
    }

    .buryit {
        margin-left: 15px;

        &::before {
            content: '\f088';
            font-family: FontAwesome;
            opacity: 0.7;
        }
    }
}

.topicListFooter {
    text-align: right;
    margin-top: 10px;
    margin-right: 0px;
}

.pager,
#nav_next_page {
    color: var(--text-color);
    text-align: right;
    margin-right: 0px !important;

    a {
        color: var(--text-color);
        padding: 4px 7px;
        border: 1px solid var(--border-color);
        border-radius: 4px;

        &:hover {
            color: var(--theme-color);
            border: 1px solid var(--theme-color);
        }
    }
}

.pager span.current {
    padding: 3px 7px;
    border: 1px solid var(--theme-color);
    background-color: var(--theme-color);
    border-radius: 4px;
    margin: 0 0 0 5px;
}

.feedback_area_title {
    font-size: 20px;
    border-bottom: 1px solid var(--border-color);
    margin: 20px 0px;
    padding-bottom: 5px;
}

#commentform_title {
    background-image: none;
    padding-left: 0;
    font-size: 20px;
    & > a {
        display: none;
    }
}

.commentform {
    #tip_comment {
        color: var(--theme-color) !important;
        margin: 15px 0px;
        display: block;
    }

    .comment_textarea {
        width: 100%;
        border: 1px solid var(--border-color);
        background-color: transparent;
        padding: 0px;

        &:focus {
            outline: 0;
        }
    }
    .commentbox_title {
        border-bottom: 1px solid var(--border-color);

        .commentbox_title_left {
            .commentbox_tab {
                margin: 0;
                padding: 5px 15px;
                color: var(--text-color);
                border-bottom: none;
            }

            .active {
                color: var(--theme-color);
            }
        }

        .commentbox_title_right {
            margin: 0 10px 0 0;

            .comment_svg:hover,
            .comment_svg_stroke:hover {
                fill: var(--theme-color);
                stroke: var(--theme-color);
            }
        }
    }

    .commentbox_footer {
        display: none;
    }

    #tbCommentBody,
    #tbCommentBodyPreview {
        padding: 10px 15px;
        background: transparent;
        color: var(--text-color);
        font-weight: 300;
    }

    #tbCommentBodyPreviewBody {
        margin-left: 0;
        min-height: 235px;
        background-color: transparent;
    }

    #btn_comment_submit {
        width: auto;
        height: auto;
        border-width: 0px;
        cursor: pointer;
        color: #fff;
        background-color: var(--theme-color);
        border-color: var(--theme-color);
        font-weight: 300;
        user-select: none;
        padding: 5px 17px;
        font-size: 13px;
        border-radius: 4px;
        outline: none;
        transition: all 0.3s;

        &:hover {
            opacity: 0.7;
        }
    }

    .comment_my_posted {
        & > img {
            display: none;
        }
    }

    .bq_post_comment {
        margin-top: 5px;
        font-size: 13px;
        display: block;
        color: var(--text-color);
        background-color: var(--border-color);
        border: none;
        border-radius: 4px;
        padding: 1px 15px;
    }
}

::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--text-color);
}
